package 设计模式.二工厂模式.简单工厂模式.pizza;

public abstract class Pizza {
    protected String name;//披萨名称

    //准备原材料，不同的披萨不一样
    public abstract void prepare();

    public void bake() {
        System.out.println(name + " baking;");
    }

    public void cut() {
        System.out.println(name + " cutting;");
    }

    public void box() {
        System.out.println(name + " boxing;");
    }

    public void setName(String name) {
        this.name = name;
    }
}
